import request from "@/utils/request.js";

export function getData(params,url){
    return request({
        url: '/api'+url,
        method: 'get',
        params: params
    })
}

export function add(params,url){
    return request({
        url: '/api' + url,
        method: 'post',
        headers: {'Content-Type': 'application/json'},
        data:params
    })
}

export function update(params,url){
    return request({
        url: '/api' + url,
        method: 'put',
        headers: {'Content-Type': 'application/json'},
        data:params
    })
}

export function remove(params,url){
    return request({
        url: '/api' + url,
        method: 'delete',
        params:params
    })
}